package com.selfdriving.activity;

import java.util.ArrayList;
import java.util.List;

import net.tsz.afinal.annotation.view.ViewInject;
import com.selfdriving.R;
import com.selfdriving.adapter.DiaryAdapter;
import com.selfdriving.bean.Diary;

import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.TextView;

public class DiaryDetailsActivity extends BaseActivity {
	@ViewInject(id = R.id.topBack, click = "topBack")
	ImageView topBack;

	@ViewInject(id = R.id.topText)
	TextView topText;

	@ViewInject(id = R.id.topRight)
	Button topRight;

	@ViewInject(id = R.id.diary_list)
	ListView diary_list;

	private List<Diary> diaries;

	private DiaryAdapter adapter;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.diary_details);
		topText.setText("景点游记");
		topRight.setVisibility(View.GONE);
		diaries = new ArrayList<Diary>();
		for (int i = 0; i < 5; i++) {
			Diary diary = new Diary();
			diaries.add(diary);
		}
		adapter = new DiaryAdapter(this, diaries);
		diary_list.setAdapter(adapter);
	}

	public void topBack(View v) {
		this.finish();
	}

}
